﻿
using System;
using System.Drawing;

using MonoTouch.Foundation;
using MonoTouch.UIKit;

namespace Beauty
{
	public partial class t1 : UIViewController
	{
		public t1 () : base ("t1", null)
		{
		}

		public override void DidReceiveMemoryWarning ()
		{
			// Releases the view if it doesn't have a superview.
			base.DidReceiveMemoryWarning ();
			
			// Release any cached data, images, etc that aren't in use.
		}

		public override void ViewDidLoad ()
		{
			base.ViewDidLoad ();
			 
			UITabBarController temp = new UITabBarController ();
			 
			var tab2 = new UIViewController ();
			tab2.TabBarItem = new UITabBarItem ();
			tab2.TabBarItem.Image = UIImage.FromFile ("second.png");
			tab2.TabBarItem.Title = "Second";
			tab2.View.BackgroundColor = UIColor.Orange;
			tab2.View.Frame = new RectangleF (0, 0, 100,300);
			var tab3 = new UIViewController ();
			tab3.TabBarItem = new UITabBarItem ();
			tab3.TabBarItem.Image = UIImage.FromFile ("second.png");
			tab3.TabBarItem.Title = "xxx";
			tab3.View.BackgroundColor = UIColor.Red;
			tab2.View.Frame = new RectangleF (100, 0, 100,300);

			UIViewController[] array = new UIViewController[]{ 
				tab2,tab3};
			temp.View.Frame = new RectangleF (0, 0, View.Frame.Width, View.Frame.Height);
			temp.ViewControllers = array;
			View.AddSubview (temp.View);
			// Perform any additional setup after loading the view, typically from a nib.
		}
	}
}

